<?phpnamespace App\Repositories\Api;use App\Models\Income;class IncomeRepository{    public function getPages($filter = [], int $pageSize = 10, int $pageNum=1, $is_sort = "")    {        $res = Income::query()                ->where("uid", "=", $filter['uid'])                ->orderBy("id" ,"desc")                ->paginate($pageSize, "*", null, $pageNum)                ->toArray();        $res = filterPaginateData($res);        foreach ($res['items'] as $k => $v) {            $res['items'][$k]['object_title'] = income_type($v['object_type']);        }        return $res;    }}